home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / os2 / adaptor.zip / ADAPT.ZIP / adaptor / src / include / system.h < prev    next >
C/C++ Source or Header  |  1993-03-22  |  3KB  |  92 lines

  1. # ifndef yySystem
  2. # define yySystem
  3.  
  4. /* $Id: System.h,v 1.3 1992/02/04 14:01:39 grosch rel $ */
  5.  
  6. /* $Log:
  7.  */
  8.  
  9. /* Ich, Doktor Josef Grosch, Informatiker, Jan. 1992 */
  10.  
  11. # ifdef __STDC__
  12. # define ARGS(parameters)    parameters
  13. # else
  14. # define ARGS(parameters)    ()
  15. # endif
  16.  
  17. /* interface for machine dependencies */
  18.  
  19. # ifndef bool
  20. # define bool char
  21. # endif
  22. # define tFile int
  23.  
  24. /* binary IO */
  25.  
  26. extern tFile    OpenInput    ARGS((char * FileName));
  27.             /* Opens the file whose name is given by the    */
  28.             /* string parameter 'FileName' for input.    */
  29.             /* Returns an integer file descriptor.        */
  30.  
  31. extern tFile    OpenOutput    ARGS((char * FileName));
  32.             /* Opens the file whose name is given by the    */
  33.             /* string parameter 'FileName' for output.    */
  34.             /* Returns an integer file descriptor.        */
  35.  
  36. extern int    Read        ARGS((tFile File, char * Buffer, int Size));
  37.             /* Reads 'Size' bytes from file 'tFile' and    */
  38.             /* stores them in a buffer starting at address    */
  39.             /* 'Buffer'.                    */
  40.             /* Returns the number of bytes actually read.    */
  41.  
  42. extern int    Write        ARGS((tFile File, char * Buffer, int Size));
  43.             /* Writes 'Size' bytes from a buffer starting    */
  44.             /* at address 'Buffer' to file 'tFile'.        */
  45.             /* Returns the number of bytes actually written.*/
  46.  
  47. extern void    Close        ARGS((tFile File));
  48.             /* Closes file 'tFile'.                */
  49.  
  50. extern bool IsCharacterSpecial    ARGS((tFile File));
  51.             /* Returns TRUE when file 'tFile' is connected    */
  52.             /* to a character device like a terminal.    */
  53.  
  54.  
  55. /* calls other than IO */
  56.  
  57. extern char *    SysAlloc    ARGS((long ByteCount));
  58.             /* Returns a pointer to dynamically allocated    */
  59.             /* memory space of size 'ByteCount' bytes.    */
  60.             /* Returns NIL if space is exhausted.        */
  61.  
  62. extern long    Time        ();
  63.             /* Returns consumed cpu-time in milliseconds.    */
  64.  
  65. extern int    GetArgCount    ();
  66.             /* Returns number of arguments.            */
  67.  
  68. extern void    GetArgument    ARGS((int ArgNum, char * Argument));
  69.             /* Stores a string-valued argument whose index    */
  70.             /* is 'ArgNum' in the memory area 'Argument'.    */
  71.  
  72. extern void    PutArgs        ARGS((int Argc, char * * Argv));
  73.             /* Dummy procedure that passes the values    */
  74.             /* 'argc' and 'argv' from Modula-2 to C.    */
  75.  
  76. extern int    ErrNum        ();
  77.             /* Returns the current system error code.    */
  78.  
  79. extern int    System        ARGS((char * String));
  80.             /* Executes an operating system command given    */
  81.             /* as the string 'String'. Returns an exit or    */
  82.             /* return code.                    */
  83.  
  84. extern void    Exit        ARGS((int Status));
  85.             /* Terminates program execution and passes the    */
  86.             /* value 'Status' to the operating system.    */
  87.  
  88. extern void    BEGIN_System    ();
  89.             /* Dummy procedure with empty body.        */
  90.  
  91. # endif
  92.